<?
require_once ("util/Transformer.php");
require_once ("util/Generator.php");
require_once ("dao/CarteiraDAO.php");
require_once ("dao/IdentificadoDAO.php");
header("Content-Type: text/html;  charset=ISO-8859-1",true);

class ViewPrepRelMMF{

	public function show() {
		$transformer = new Transformer();
		$generator = new Generator();
		$transformer->setDirFisicoTemplates("template/");
		$transformer->setArquivoTemplate("esqueletoBase.htm"); 
		//Inclui o templete base de todas as telas.
		$valoresTroca = array ();
		$valoresTroca["erro"] = $generator->getErro();
		$valoresTroca["alerta"] = $generator->getAlerta();
		$valoresTroca["body"] = $this->getBody();
		$transformer->setValoresTroca($valoresTroca);
		$saida = $transformer->processaHTML();
		echo $saida;
	}

	
	private function getBody(){
		
		$transformer = new Transformer();
		$valoresTroca = array ();		
		$identificado=new IdentificadoDAO();
		
		$valoresTroca['regantigo']=$_SESSION['MMF']['regantigo'];
		$valoresTroca['registro']=$_SESSION['MMF']['registro'];
		$valoresTroca['nip']=$_SESSION['MMF']['nip'];
		$valoresTroca['nome']=$_SESSION['MMF']['nome'];
				
		$transformer->setDirFisicoTemplates("template/MMF/");
		$transformer->setArquivoTemplate("MMF_imprimeFoto.htm"); 
		$transformer->setValoresTroca($valoresTroca); 	
		$saida = $transformer->processaHTML();		
		return $saida;
	}
 }

?>